package com.sundi.ecmarket.service.impl;

import com.sundi.ecmarket.dto.CategoryDto;
import com.sundi.ecmarket.entity.EcCategory;
import com.sundi.ecmarket.mapper.EcCategoryMapper;
import com.sundi.ecmarket.service.IEcCategoryService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.sundi.ecmarket.vo.CategoryVo;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 类目表 服务实现类
 * </p>
 *
 * @author Mht
 * @since 2020-02-23
 */
@Service
public class EcCategoryServiceImpl extends ServiceImpl<EcCategoryMapper, EcCategory> implements IEcCategoryService {

    @Override
    public List<CategoryVo> selectCateList(CategoryDto categoryDto) {
        return this.baseMapper.selectCateList(categoryDto);
    }

    @Override
    public boolean deleteByCate(Integer id) {
        return this.baseMapper.deleteByCate(id);
    }

    @Override
    public List<EcCategory> selectParentList(CategoryDto categoryDto) {
        return this.baseMapper.selectParentList(categoryDto);
    }

    @Override
    public int selectMaxId() {
        return this.baseMapper.selectMaxId();
    }
}
